<?php
return [
	'language' => 'zh-CN',
	'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
	'bootstrap' => ['log'],
	'components' => [
		'cache' => [
			'class' => 'yii\caching\FileCache',
		],
		'authManager' => [
			'class' => 'yii\rbac\DbManager',
			'defaultRoles' => ['guest']
		],
		'i18n' => [
			'translations' => [
				'common*' => [
					'class' => 'yii\i18n\PhpMessageSource',
					'basePath' => '@common/messages',
				],
				'backend*' => [
					'class' => 'yii\i18n\PhpMessageSource',
					'basePath' => '@backend/messages',
					'fileMap' =>[
						'backend' => 'common.php',
					],
				],
				'frontend*' => [
					'class' => 'yii\i18n\PhpMessageSource',
					'basePath' => '@frontend/messages',
					'fileMap' =>[
						'frontend' => 'frontend.php',
						'frontend/user' => 'user.php',
					],
				],
				'api*' => [
					'class' => 'yii\i18n\PhpMessageSource',
					'basePath' => '@api/messages',
					'fileMap' =>[
						'api' => 'api.php',
						'api/user' => 'user.php',
					],
				],
				'*' => [
					'class' => 'yii\i18n\PhpMessageSource',
					'basePath' => '@app/messages',
				],
			],
		],
		'log' => [
			'traceLevel' => YII_DEBUG? 3 : 0,
			'targets' => [
			   [
					'class' =>'yii\log\FileTarget',
					'levels' => ['error', 'warning', 'info'],
			   ],
			   [
					'class' => 'yii\log\FileTarget',
					'levels' => ['info'],
					'categories' => ['task'],
					'logFile' => '@app/runtime/logs/task/task.log',
					'maxFileSize' => 1024 * 2,
					'maxLogFiles' => 100,
					// USEAGE: Yii::info($message, 'task');
			   ],
			   [
					'class' => 'yii\log\FileTarget',
					'levels' => ['info'],
					'categories' => ['player'],
					'logFile' => '@app/runtime/logs/player/player.log',
					'maxFileSize' => 1024 * 2,
					'maxLogFiles' => 100,
					// USEAGE: Yii::info($message, 'player');
			   ],
			],
		],
	],
	'modules' => [
		'treemanager' =>  [
			'class' => '\kartik\tree\Module',
			// other module settings, refer detailed documentation
		],
		'gridview' =>  [
			'class' => '\kartik\grid\Module'
			// enter optional module parameters below - only if you need to  
			// use your own export download action or custom translation 
			// message source
			// 'downloadAction' => 'gridview/export/download',
			// 'i18n' => []
		],
	],
];
